<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : ProductStyleSheet.xsl
    Created on : November 17, 2013, 10:08 PM
    Author     : LeMinh
    Description:
        Purpose of transformation follows.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html"/>

    <!-- TODO customize transformation rules 
         syntax recommendation http://www.w3.org/TR/xslt 
    -->
    <xsl:template match="/">
        <xsl:apply-templates />
    </xsl:template>
    <xsl:template match="products">
        <xsl:for-each select="product" >

            <tr>
                <td>
                    <xsl:number value="position()" format="1" />
                </td>
                <td>
                    <xsl:value-of select="name" />
                </td>
                <td>
                    <xsl:value-of select="price" />
                </td>
                <td>
                    <xsl:variable name="img" select="imgLink"/>
                    <img src="{$img}" width="80" height="50" />
                   
                </td>
                <td>
                    <xsl:value-of select="productLink" />
                </td>
            </tr>
        </xsl:for-each>
    </xsl:template>
</xsl:stylesheet>
